home *** CD-ROM | disk | FTP | other *** search
- Path: pacsibm.org!root
- From: rvaughn@pacsibm.org (RussellMania)
- Newsgroups: comp.lang.c++
- Subject: DOS Like Pipe Operator In C++??
- Date: 16 Mar 1996 22:32:03 GMT
- Organization: PACS IBM SIG BBS
- Message-ID: <4iffh3$p01@netaxs.com>
- NNTP-Posting-Host: pacsibm.org
- Originator: root@pacsibm.org
-
- Thanks for all repiles. Assume iostream.h loaded for following:
- class world {
- int x;
- public:
- world(int a) { x = a; }
- void set(int xx) { x = xx; }
- };
- class hello {
- int x;
- world view; // define an object as a private member
- public:
- void set(int x) { view.set(x); } // set function
- int y; // data member
- hello(int z):view(z) { x = 57; y = 66; } // constructor??
- void display() {cout << x << " " << y << '\n'; view.display(;}
- };
- void main(void)
- { hello peace(55); peace.display(); }
- Outputs are 57 66
- and 55
- Is the : character in the constructor of class hello acting as
- a pipe? Thanks again for all replies...Russell
-